/*
 * Implementation of checker "2.12    减少运算强度"
 * Author: Fengjuan Gao
 *
 */
#include <fstream>
#include <iostream>
#include <list>
#include <queue>
#include <sstream>
#include <stack>
#include <string>

#include <clang/AST/AST.h>
#include <clang/AST/ASTConsumer.h>
#include <clang/AST/Expr.h>
#include <clang/AST/RecursiveASTVisitor.h>
#include <clang/AST/RecordLayout.h>
#include <clang/Frontend/ASTConsumers.h>
#include <clang/Frontend/ASTUnit.h>
#include <clang/Tooling/Tooling.h>
#include <llvm/Support/raw_ostream.h>

#include "framework/BasicChecker.h"
#include "framework/Report.h"

using namespace clang;
using namespace llvm;
using namespace clang::driver;
using namespace clang::tooling;
using namespace std;

class FindBinaryOperations;


class ExpensiveOperationChecker : public BasicChecker {
protected:
    std::string enableAliasAnalysis;
    IgnLibPathConfig IlpCfg;
    
public:
    ExpensiveOperationChecker(ASTResource *resource, ASTManager *manager,
                  CallGraph *call_graph, Config *configure)
      : BasicChecker(resource, manager, call_graph, configure){};
    void check();

private:
    void handle();
    void readConfig();
};
